
use crate::metadata::ir::*;
pub(crate) static REGISTERS: IR = IR {
    blocks: &[Block {
        name: "Pwr",
        extends: None,
        description: Some("Power control"),
        items: &[
            BlockItem {
                name: "cr1",
                description: Some("power control register"),
                array: None,
                byte_offset: 0x0,
                inner: BlockItemInner::Register(Register {
                    access: Access::ReadWrite,
                    bit_size: 32,
                    fieldset: Some("Cr1"),
                }),
            },
            BlockItem {
                name: "csr1",
                description: Some("power control/status register"),
                array: None,
                byte_offset: 0x4,
                inner: BlockItemInner::Register(Register {
                    access: Access::ReadWrite,
                    bit_size: 32,
                    fieldset: Some("Csr1"),
                }),
            },
        ],
    }],
    fieldsets: &[
        FieldSet {
            name: "Cr1",
            extends: None,
            description: Some("power control register"),
            bit_size: 32,
            fields: &[
                Field {
                    name: "lpds",
                    description: Some("Low-power deep sleep"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "pdds",
                    description: Some("Power down deepsleep"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
                    bit_size: 1,
                    array: None,
                    enumm: Some("Pdds"),
                },
                Field {
                    name: "cwuf",
                    description: Some("Clear wakeup flag"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 2 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "csbf",
                    description: Some("Clear standby flag"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 3 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "pvde",
                    description: Some("Power voltage detector enable"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 4 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "pls",
                    description: Some("PVD level selection"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 5 }),
                    bit_size: 3,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "dbp",
                    description: Some("Disable backup domain write protection"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 8 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "fpds",
                    description: Some("Flash power down in Stop mode"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 9 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "lplvds",
                    description: Some("Low-Power Regulator Low Voltage in deepsleep"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 10 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "mrlvds",
                    description: Some("Main regulator low voltage in deepsleep mode"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 11 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "adcdc1",
                    description: Some("ADCDC1"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 13 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "vos",
                    description: Some("Regulator voltage scaling output selection"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 14 }),
                    bit_size: 2,
                    array: None,
                    enumm: Some("Vos"),
                },
                Field {
                    name: "oden",
                    description: Some("Over-drive enable (STM32F4[23] ONLY)"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 16 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "odswen",
                    description: Some("Over-drive switching enabled (STM32F4[23] ONLY)"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 17 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "uden",
                    description: Some("Under-drive enable in stop mode (STM32F4[23] ONLY)"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 18 }),
                    bit_size: 2,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "fmssr",
                    description: Some("Flash Memory Stop while System Run"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 20 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "fissr",
                    description: Some("Flash Interface Stop while System Run"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 21 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
            ],
        },
        FieldSet {
            name: "Csr1",
            extends: None,
            description: Some("power control/status register"),
            bit_size: 32,
            fields: &[
                Field {
                    name: "wuf",
                    description: Some("Wakeup flag"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "sbf",
                    description: Some("Standby flag"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "pvdo",
                    description: Some("PVD output"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 2 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "brr",
                    description: Some("Backup regulator ready"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 3 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "ewup2",
                    description: Some("Enable WKUP2 pin"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 7 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "ewup",
                    description: Some("Enable WKUP pin"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 8 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "bre",
                    description: Some("Backup regulator enable"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 9 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "vosrdy",
                    description: Some("Regulator voltage scaling output selection ready bit (STM32F4[23] ONLY)"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 14 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "odrdy",
                    description: Some("Over-drive mode ready (STM32F4[23] ONLY)"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 16 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "odswrdy",
                    description: Some("Over-drive mode switching ready (STM32F4[23] ONLY)"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 17 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "udrdy",
                    description: Some("Under-drive ready flag"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 18 }),
                    bit_size: 2,
                    array: None,
                    enumm: None,
                },
            ],
        },
    ],
    enums: &[
        Enum {
            name: "Pdds",
            description: None,
            bit_size: 1,
            variants: &[
                EnumVariant {
                    name: "STOP_MODE",
                    description: Some("Enter Stop mode when the CPU enters deepsleep"),
                    value: 0,
                },
                EnumVariant {
                    name: "STANDBY_MODE",
                    description: Some("Enter Standby mode when the CPU enters deepsleep"),
                    value: 1,
                },
            ],
        },
        Enum {
            name: "Vos",
            description: None,
            bit_size: 2,
            variants: &[
                EnumVariant {
                    name: "SCALE3",
                    description: Some("Scale 3 mode (STM32F4[23] ONLY)"),
                    value: 1,
                },
                EnumVariant {
                    name: "SCALE2",
                    description: Some("Scale 2 mode"),
                    value: 2,
                },
                EnumVariant {
                    name: "SCALE1",
                    description: Some("Scale 1 mode (reset value)"),
                    value: 3,
                },
            ],
        },
    ],
};
